<div class="layui-side layui-bg-black">
	<div class="layui-side-scroll">
		<#include "/apps/business/xiaoe/include/left.html">
	</div>
</div>
<div class="layui-body">
	<div class="layui-side-scroll">
		<div class="row" style="height:100%;">
			<div class="col-lg-12" style="border-right:1px solid #e6e6e6;padding-right:0px;">
				<h1 class="site-h1" style="background-color:#FFFFFF;">
					机器人列表<#if serviceAiList??>（${serviceAiList.totalElements}）</#if>
					<span style="float:right;">
						<button class="layui-btn layui-btn-sm green" href="/apps/xiaoe/serviceai/add.html" data-toggle="ajax" data-height="300" data-width="450" data-title="新建机器人">
							新建机器人
						</button>
					</span>
				</h1>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<table class="layui-table" lay-skin="line">
							<thead>
							<tr>
							  <th>名称</th>
							  <th>标识</th>
							  <th>备注</th>
							  <th>创建时间</th>
							  <th style="white-space:nowrap;" nowrap="nowrap" style="width:1%">操作</th>
							</tr> 
						  </thead>
						  <tbody>
						  	<#if serviceAiList?? && serviceAiList.content?? && serviceAiList.content?size gt 0>
							<#list serviceAiList.content as serviceAi>
							<tr>
							  <td class="ukefu_topic_title">
									${serviceAi.name!''}
							  </td>
							  
							  <td class="ukefu_topic_title">
									${serviceAi.id!''}
							  </td>
							  
							  <td class="ukefu_topic_title">
									${serviceAi.description!''}
							  </td>
							  
							  <td class="ukefu_topic_title">
									${serviceAi.createtime?string('yyyy-MM-dd HH:mm:ss')}
							  </td>
							  <td style="white-space: nowrap;width:1%;">
							  		<a href="/apps/xiaoe/config.html?id=${(serviceAi.id!'')?url}">
							  			<i class="layui-icon">&#xe620;</i>
							  			机器人配置
							  		</a>
							  		<a href="/apps/xiaoe/serviceai/delete.html?id=${(serviceAi.id!'')?url}" data-toggle="tip" data-title="请确认是否删除机器人？">
							  			<i class="layui-icon" style="color:red;">ဆ</i>
							  			移除
							  		</a>
							  </td>
							  </tr>
							</#list>
							</#if>
						</table>
					</div> 	   
				</div>
				<div class="row" style="padding:5px;">
					<div class="col-lg-12" id="page" style="text-align:center;"></div>
				</div>
			</div>	
		</div>
	</div>
</div>
<script type="text/javascript">
layui.use(['laypage', 'layer'], function(){
	  var laypage = layui.laypage
	  ,layer = layui.layer;
	  <#if msg??>
	  top.layer.msg('${msg}');
	  </#if>
	  laypage.render({
			elem: 'page'
			,pages: <#if serviceAiList??>${serviceAiList.totalPages}<#else>0</#if> //总页数
			,curr:<#if serviceAiList??>${serviceAiList.number+1}<#else>0</#if>
			,groups: 5 //连续显示分页数
			,jump:function(data , first){
				if(!first){
					location.href = "/apps/xiaoe/index.html?p="+data.curr ;
				}
			}
	   });
	});
</script>